
using Microsoft.Xna.Framework;
using System.Collections.Generic;
namespace BSCore
{
    public abstract class MapEntity:DrawableGameComponent
    {

        public int ID { get; set; }

        public Vector3 Position { get; set; }

        public Direction Facing { get; set; }

        public SpriteType CurrentSpriteType { get; set; }

        public List<SpriteSet> SpriteSets { get; set; }

        public MapEntity(BSGame game )
            : base(game)
        {

        }

        public override void Draw(GameTime gameTime)
        {
            foreach (SpriteSet spriteSet in SpriteSets)
            {
                if (spriteSet.Direction == Facing & CurrentSpriteType == spriteSet.SpriteType)
                {
                    spriteSet.Draw(((BSGame)Game).SpriteBatch, new Vector2(Position.X, Position.Y));
                    break;
                }

            }

        }


    }
}
